In [1]:
import numpy as np
import pandas as pd
In [2]:
def compoundterms(ethnicities, terms, filename):
rows = []
for ethnicity in ethnicities:
row = []
for term in terms:
new_word = ethnicity + term
#print(new_word)
row.append(new_word)
rows.append(row)
#print(rows)
csv_data = pd.DataFrame.from_records(rows, index=ethnicities, columns=terms)
csv_data.to_csv(filename)
#print(csv_data)
In [3]:
all_ethnicities = ["White", "European", "Caucasian", "Spanish", "Mexican", "Hispanic", "Latino", "Chicano",
"Puerto Rican", "Dominican", "Black", "Negro", "African", "Middle Eastern", "Arab", "Persian",
"Iranian", "Turkish", "North African", "Asian", "Chinese", "Japanese", "Korean", "Vietnamese",
"Filipino", "East Asian", "Indian", "Asian Indian", "South Asian", "Pakistani", "Bangladeshi",
"Pacific Islander", "Native Hawaiian", "Guamanian", "Chamorro", "Samoan", "American Indian",
"Eskimo", "Alaska Native", "Native American", "Inuit", "First Nations"]
all_terms = ["s", " American", " Americans", "-American", "-Americans", " individual", " individuals", " human being",
" human beings", " person", " people", " peoples", " kid", " kids", " child", " children", " boy",
" boys", " man", " men", " girl", " girls", " woman", " women", " guy", " guys", " dude", " dudes",
" baby", " babies", " infant", " infants", " teenager", " teenagers", " adolescent", " adolescents",
" adult", " adults", " family", " families", " folk", " folks", " husband", " husbands", " wife",
" wives", " friend", " friends", " boyfriend", " guy friends", " girlfriend", " girlfriends",
" girl friends", " student", " students", " professor", " professors", " teacher", " teachers",
" population", " populations", " populace", " immigrant", " immigrants", " community", " communities",
" citizen", " citizens", " resident", " residents", " majority", " majorities", " minority", " minorities",
" member", " members", " voter", " voters", " occupant", " occupants", " subject", " subjects", " participant",
" participants", " commoner", " commoners", " inhabitant", " inhabitants", " settler", " settlers", " villager",
" villagers", " scholar", " scholars", " civilian", " civilians", " representative", " representatives", " personage",
" customer", " customers", " consumer", " consumers", " worker", " workers", " employee", " employees", " employer",
" employers", " gal", " gals", " gentleman", " gentlemen", " lady", " ladies", " son", " sons", " spouse", " spouses",
" papa", " aunt", " aunts", " niece", " nieces", " nephew", " nephews", " uncle", " uncles", " cousin", " cousins",
" brother", " brothers", " sister", " sisters", " doctor", " doctors", " nurse", " nurses", " lawyer", " lawyers",
" master", " masters", " President", " Presidents", " secretary", " secretaries", " engineer", " engineers",
" police officer", " police officers", " tutor", " tutors", " identity", " identities", " self", " selves",
" heritage", " background", " ethnicity", " subject", " subjects", " government", " governments", " peasant", " peasants",
" slave", " slaves", " laborer", " laborers", " ruler", " rulers", " celebrity", " celebrities", " actor", " actors",
" actress", " actresses", " comedian", " comedians", " hero", " heroes", " neighbor", " neighbors", " politician",
" politicians", " artisan", " artisans", " clerk", " clerks", " maid", " maids", " faculty", " faculty member",
" faculty members", " staff", " staff member", " staff members", " assistant", " assistants", " servant", " servants",
" laborer", " laborers", " slave", "slaves", " peasant", " peasants", " race", " culture", " stereotype", " stereotypes",
" name", " names", " so", " typical", " crowd", " crowds", " kin", " kins", " clan", " clans", " tribe", " tribes", " custom",
" customs", " practice", " practices", " nationality", " nationalities", " heritages", " backgrounds", " ethnicities", " races",
" society", " societies", " group", " groups", " trait", " traits"]
compoundterms(all_ethnicities, all_terms, "/Users/roxannemoadel-attie1/compsocial/Census Map/Census_Map_All_Terms.csv")
In [4]:
global_ethnicities = ["White", "European", "Caucasian", "Spanish", "Mexican", "Hispanic", "Latino", "Chicano",
"Puerto Rican", "Dominican", "Black", "Negro", "African", "Middle Eastern", "Arab", "Persian",
"Iranian", "Turkish", "North African", "Asian", "Chinese", "Japanese", "Korean", "Vietnamese",
"Filipino", "East Asian", "Indian", "Asian Indian", "South Asian", "Pakistani", "Bangladeshi",
"Pacific Islander", "Native Hawaiian", "Guamanian", "Chamorro", "Samoan", "American Indian",
"Eskimo", "Alaska Native", "Native American", "Inuit", "First Nations"]
global_terms = ["s", " American", " Americans", "-American", "-Americans", " individual", " individuals", " human being",
" human beings", " person", " people", " peoples", " folk", " folks", " population", " populations", " populace",
" immigrant", " immigrants", " community", " communities", " citizen", " citizens", " resident", " residents",
" majority", " majorities", " minority", " minorities", " member", " members", " voter", " voters", " occupant",
" occupants", " subject", " subjects", " participant", " participants", " commoner", " commoners", " inhabitant",
" inhabitants", " settler", " settlers", " villager", " villagers", " civilian", " civilians", " representative",
" representatives", " personage", " customer", " customers", " consumer", " consumers", " worker", " workers",
" employee", " employees", " employer", " employers", " subject", " subjects", " government", " governments", " hero",
" heroes", " crowd", " crowds", " kin", " kins", " clan", " clans", " tribe", " tribes", " society", "societies",
" group", " groups"]
compoundterms(global_ethnicities, global_terms, "/Users/roxannemoadel-attie1/compsocial/Census Map/Census_Map_Global_Terms.csv")
In [5]:
local_ethnicities = ["White", "European", "Caucasian", "Spanish", "Mexican", "Hispanic", "Latino", "Chicano",
"Puerto Rican", "Dominican", "Black", "Negro", "African", "Middle Eastern", "Arab", "Persian",
"Iranian", "Turkish", "North African", "Asian", "Chinese", "Japanese", "Korean", "Vietnamese",
"Filipino", "East Asian", "Indian", "Asian Indian", "South Asian", "Pakistani", "Bangladeshi",
"Pacific Islander", "Native Hawaiian", "Guamanian", "Chamorro", "Samoan", "American Indian",
"Eskimo", "Alaska Native", "Native American", "Inuit", "First Nations"]
local_terms = [" kid", " kids", " child", " children", " boy",
" boys", " man", " men", " girl", " girls", " woman", " women", " guy", " guys", " dude", " dudes",
" baby", " babies", " infant", " infants", " teenager", " teenagers", " adolescent", " adolescents",
" adult", " adults", " family", " families", " husband", " husbands", " wife",
" wives", " friend", " friends", " boyfriend", " guy friends", " girlfriend", " girlfriends",
" girl friends", " student", " students", " professor", " professors", " teacher", " teachers",
" scholar", " scholars", " gal", " gals", " gentleman", " gentlemen", " lady", " ladies", " son", " sons",
" spouse", " spouses", " papa", " aunt", " aunts", " niece", " nieces", " nephew", " nephews", " uncle",
" uncles", " cousin", " cousins", " brother", " brothers", " sister", " sisters", " doctor", " doctors",
" nurse", " nurses", " lawyer", " lawyers", " master", " masters", " President", " Presidents", " secretary",
" secretaries", " engineer", " engineers", " police officer", " police officers", " tutor", " tutors", "ruler",
" rulers", " celebrity", " celebrities", " actor", " actors", " actress", " actresses", " comedian", " comedians",
" neighbor", " neighbors", " politician", " politicians", " artisan", " artisans", " clerk", " clerks", " maid",
" maids", " faculty", " faculty member", " faculty members", " staff", " staff member", " staff members",
" assistant", " assistants", " servant", " servants", " laborer", " laborers", " slave", " slaves", " peasant",
" peasants"]
compoundterms(local_ethnicities, local_terms, "/Users/roxannemoadel-attie1/compsocial/Census Map/Census_Map_Local_Terms.csv")
In [7]:
conceptual_ethnicities = ["White", "European", "Caucasian", "Spanish", "Mexican", "Hispanic", "Latino", "Chicano",
"Puerto Rican", "Dominican", "Black", "Negro", "African", "Middle Eastern", "Arab", "Persian",
"Iranian", "Turkish", "North African", "Asian", "Chinese", "Japanese", "Korean", "Vietnamese",
"Filipino", "East Asian", "Indian", "Asian Indian", "South Asian", "Pakistani", "Bangladeshi",
"Pacific Islander", "Native Hawaiian", "Guamanian", "Chamorro", "Samoan", "American Indian",
"Eskimo", "Alaska Native", "Native American", "Inuit", "First Nations"]
conceptual_terms = [" identity", " identities", " self", " selves", " heritage", " heritages", " background",
" backgrounds", " ethnicity", " ethnicities", " race", " races", " culture", " cultures",
" stereotype", " stereotypes", " name", " names", " custom", " customs", " practice",
" practices", " nationality", " nationalities", " trait", " traits"]
compoundterms(conceptual_ethnicities, conceptual_terms, "/Users/roxannemoadel-attie1/compsocial/Census Map/Census_Map_Conceptual_Terms.csv")
In [8]:
adjective_ethnicities = [" White", " European", " Caucasian", " Spanish", " Mexican", " Hispanic", " Latino", " Chicano",
" Puerto Rican", " Dominican", " Black", " Negro", " African", " Middle Eastern", " Arab", " Persian",
" Iranian", " Turkish", " North African", " Asian", " Chinese", " Japanese", " Korean", " Vietnamese",
" Filipino", " East Asian", " Indian", " Asian Indian", " South Asian", " Pakistani", " Bangladeshi",
" Pacific Islander", " Native Hawaiian", " Guamanian", " Chamorro", " Samoan", " American Indian",
" Eskimo", " Alaska Native", " Native American", " Inuit", " First Nations"]
adjective_terms = ["native", "Native", "prototypical", "Protoypical", "stereotypical", "Stereotypical", "average",
"Average", "atypical", "Atypical", "so", "So", "typical", "Typical"]
compoundterms(adjective_terms, adjective_ethnicities, "/Users/roxannemoadel-attie1/compsocial/Census Map/Census_Map_Adjective_Terms.csv")
In [ ]: